GtkWidgetPath *widget_path;
GHashTable *style_data;
GtkStyleInfo *info;
+ gint scale;
GdkFrameClock *frame_clock;
guint frame_clock_update_id;
_gtk_css_lookup_resolve (lookup,
GTK_STYLE_PROVIDER_PRIVATE (priv->cascade),
+ priv->scale,
values,
priv->parent ? style_data_lookup (priv->parent)->store : NULL);
return context->priv->info->state_flags;
}
+/**
+ * gtk_style_context_set_scale:
+ * @context: a #GtkStyleContext
+ * @scale: scale
+ *
+ * Sets the scale to use when getting image assets for the style .
+ *
+ * Since: 3.10
+ **/
+void
+gtk_style_context_set_scale (GtkStyleContext *context,
+ gint scale)
+{
+ g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
+
+ if (context->priv->scale == scale)
+ return;
+
+ context->priv->scale = scale;
+
+ gtk_style_context_queue_invalidate_internal (context, GTK_CSS_CHANGE_SOURCE);
+}
+
+/**
+ * gtk_style_context_get_scale:
+ * @context: a #GtkStyleContext
+ *
+ * Returns the scale used for assets.
+ *
+ * Returns: the scale
+ *
+ * Since: 3.10
+ **/
+gint
+gtk_style_context_get_scale (GtkStyleContext *context)
+{
+ g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), 0);
+
+ return context->priv->scale;
+}
+
/**
* gtk_style_context_state_is_running:
* @context: a #GtkStyleContext
GDK_AVAILABLE_IN_ALL
GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context);
+GDK_AVAILABLE_IN_3_10
+void gtk_style_context_set_scale (GtkStyleContext *context,
+ gint scale);
+GDK_AVAILABLE_IN_3_10
+gint gtk_style_context_get_scale (GtkStyleContext *context);
+
GDK_DEPRECATED_IN_3_6
gboolean gtk_style_context_state_is_running (GtkStyleContext *context,
GtkStateType state,